//
//  PlayerSlider.h
//  Slider
//
//  Created by annidyfeng on 2018/8/27.
//  Copyright © 2018年 annidy. All rights reserved.
//

#import <UIKit/UIKit.h>
@protocol CTPlayerSliderDelegate;

@interface CTPlayerPoint : NSObject

@property (nonatomic, assign) float where;
@property (nonatomic, strong) UIControl *holder;
@property (nonatomic, copy) NSString *content;
@property (nonatomic, assign) NSInteger timeOffset;

@end

#pragma mark - —————————————— CTPlayerSlider ————————————

@interface CTPlayerSlider : UISlider

@property (nonatomic, strong) NSMutableArray<CTPlayerPoint *> *pointArray;
@property (nonatomic, strong) UIProgressView *progressView;
@property (nonatomic, assign) BOOL hiddenPoints;
@property (nonatomic, weak) id<CTPlayerSliderDelegate> delegate;

- (CTPlayerPoint *)addPoint:(GLfloat)where;

@end

#pragma mark - —————————————— CTPlayerSliderDelegate ————————————

@protocol CTPlayerSliderDelegate <NSObject>

- (void)onPlayerPointSelected:(CTPlayerPoint *)point;

@end
